﻿<%@ Page Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeBehind="ApplicationList.aspx.cs"
    Inherits="WebAppAuthAdmin.App.ApplicationList" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <h2>
        Aplicaciones
    </h2>
    <div class="editionContainerFilter" id="searchDiv">
        <p>
            <span class="title">Nombre:</span>          
            <asp:TextBox ID="txtNombre" runat="server"></asp:TextBox>
        </p>
         <div class="clear">
        </div>
        <asp:LinkButton ID="lnkBuscar" runat="server" onclick="lnkBuscar_Click" ClientIDMode="Static" >Buscar</asp:LinkButton>
        <div class="clear">
        </div>
    </div>

    <div class="clear" />

     <h2>
        <asp:Image Width="15px" Height="15px" ID="Image1" CssClass="imgExpand"
            ImageUrl="/Images/icon_blockexpanded.png" runat="server" ClientIDMode="Static"
            alt="" onclick="window.AppCommonObj.toggleVisibility(this.id, 'pnlResults');" />
       Resultados
    </h2>      
    <div class="editionContainerForGrid" id="pnlResults">
        <asp:GridView ID="GridApplication" runat="server" CellPadding="4" ForeColor="#333333" OnRowDataBound="GridCustomer_RowDataBound"
            GridLines="None" AutoGenerateColumns="False" DataKeyNames="Id" OnRowCommand="GridApplication_RowCommand"
            Width="100%">
            <AlternatingRowStyle BackColor="White" />
            <Columns>
                <asp:ButtonField ButtonType="Image" CommandName="editar" ImageUrl="~/Images/editar.png"
                    Text="Button" AccessibleHeaderText="editar">
                    <HeaderStyle HorizontalAlign="Left" Width="30px" />
                    <ItemStyle HorizontalAlign="Center" />
                </asp:ButtonField>
                <asp:ButtonField ButtonType="Image" CommandName="eliminar" ImageUrl="~/Images/eliminar.png"
                    Text="Button" AccessibleHeaderText="editar">
                    <HeaderStyle HorizontalAlign="Left" Width="30px" />
                    <ItemStyle HorizontalAlign="Center" />
                </asp:ButtonField>
                <asp:BoundField AccessibleHeaderText="Id" DataField="Id" InsertVisible="False" Visible="False" />
                <asp:BoundField DataField="Name" HeaderText="Nombre">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField DataField="Url" HeaderText="Url">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
            </Columns>
            <EditRowStyle BackColor="#2461BF" />
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#4b6c9e" Font-Bold="True" ForeColor="White" HorizontalAlign="Left" />
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#EFF3FB" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#F5F7FB" />
            <SortedAscendingHeaderStyle BackColor="#6D95E1" />
            <SortedDescendingCellStyle BackColor="#E9EBEF" />
            <SortedDescendingHeaderStyle BackColor="#4870BE" />
        </asp:GridView>
    </div>
    <asp:LinkButton ID="btnAgregarNuevo" CssClass="agregarNuevo" runat="server" OnClick="btnAgregarNuevo_Click">Agregar</asp:LinkButton>

      <script type='text/javascript'>

          $(document).ready(function () {

              if (!window.AppCommonObj) {
                  window.AppCommonObj = new AppCommon();
              }

              window.AppCommonObj.initializeEnterKeyEvent($('#searchDiv'), function () {
                  if ($('#lnkBuscar').click()) {
                      __doPostBack($('#lnkBuscar').attr('aspnetid'), '');
                  };
              });

          });
    </script>
</asp:Content>
